package com.dropdb.demo.controller.admin;

import com.dropdb.demo.bean.Footprint;
import com.dropdb.demo.bean.bo.BaseData;
import com.dropdb.demo.bean.vo.BaseRespVO;
import com.dropdb.demo.service.FootprintService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author:tanxin Desc:
 * @date:2020/6/27 0:52
 */
@RestController
public class AdminFootprintController {

    @Resource
    FootprintService footprintService;

    @RequestMapping("/admin/footprint/list")
    @RequiresPermissions(value = {"*", "admin:footprint:list"}, logical = Logical.OR)
    public BaseRespVO queryFootprint(Integer page,Integer limit,String sort,String order,Integer userId,Integer goodsId){
        BaseData baseData = footprintService.queryFootPrint(page, limit, sort, order, userId, goodsId);
        return  BaseRespVO.ok(baseData);
    }
}
